<?php
/**
 *
 * @package    gadgets
 * @author     Daniel Botelho <botelho.daniel@gmail.com>
 */
class GadgetsJson
{
  const DEFAULT_CLASS = 'gadgets.json';
   
  /**
   * Parses a JSON string, producing a JavaScript value. 
   */
  public static function parse($text,$appendable=false)
  {
  	$html = "gadgets.json.parse($text)";
  	return StringUtil::appendableString($html,$appendable);
  }
    
  /**
   * Converts a JavaScript value to a JSON string.
   */
  public static function stringify($v,$appendable=false)
  {
  	$html = "gadgets.json.stringify($v)";
  	return StringUtil::appendableString($html,$appendable);
  }
    
}